/*
 * Copyright (c) 2012-2014, EpicSaaS Yuan Xin technology Co., Ltd.
 * 
 * All rights reserved.
 */
package com.epicsaas.app.ksdapp.controller.phone;

import com.epicpaas.sdk.core.api.logging.Logger;
import com.epicpaas.sdk.core.api.logging.LoggerFactory;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;

import javax.validation.Valid;

import org.springframework.ui.Model;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Common控制器。
 * 
 */
@Controller
@RequestMapping(value = "/phone/common")
public class CommonController {

    private static Logger LOG = LoggerFactory.getLogger(CommonController.class);

    /**3.9.0 获取地区 */
    @RequestMapping(value = "/area", method = { RequestMethod.GET, RequestMethod.POST })
    @ResponseBody
    public Object getHello(String parentId, Model model, HttpServletRequest request) {
        LOG.info("有访问来自，IP: %s USER-AGENT: %s", request.getRemoteAddr(), request.getHeader("user-agent"));
        LOG.info("SessionId %s", request.getSession().getId());

        Map<String, String> map = new HashMap<String, String>();
        map.put("1", "ddd");
        map.put("2", "22");
        return map;
    }

}
